import { createApp } from 'vue'
import App from './App.vue'
import router  from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// import * as Icons from '@element-plus/icons-vue'
import * as Icon from '@element-plus/icons'
import{toLine} from './utils'
// 引入全部组件
import allComponent from "./components"
// 引入某个组件
// import chooseArea from "./components/chooseArea"
const app=createApp(App)


// 全局注册图标,牺牲一点性能
//el-icon-xxx
// for (const [key, component] of Object.entries(Icon)) {
//   app.component(key, component)
// }
for (let i in Icon){
	app.component(`el-icon${toLine(i)}`,(Icon as any)[i])
	// console.log((Icon as any)[i])
	// console.log(i,toLine(i))
}
// let ss=toLine('ABdc')
app.use(router).use(ElementPlus)
.use(allComponent)
app.mount('#app')
